package entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name="headerteacher")
public class HeaderTeacher {
/*
 * 2018.12.19
 * Hibernate0402工程用JDBC的方法实现对数据表的相关操作;
 * 不带参数的构造方法
 * 对象的私有属性，例如：id，name等等；
 * 对象的get方法；
 * 对象的set方法
 * useUnicode=true&characterEncoding=UTF-8 ---->指定字符的编码、解码格式
 * 
 */
	

	private String id;
	private String loginName;
	private String password;
	private String sex;
	private String photo;
	
	public HeaderTeacher(){

	}
	
	
	
	public HeaderTeacher(String id, String loginName, String password, String sex, String photo) {
		this.id = id;
		this.loginName = loginName;
		this.password = password;
		this.sex = sex;
		this.photo = photo;
	}


	
	@Id
	@GeneratedValue(generator="system_uuid")
	@GenericGenerator(name="system_uuid",strategy="uuid")
	public String getid() {
		return id;
	}
	public void setid(String Id) {
		this.id = Id;
	}
	public String getloginName() {
		return loginName;
	}
	public void setloginName(String loginName) {
		this.loginName = loginName;
	}
	public String getpassword() {
		return password;
	}
	public void setpassword(String tpassword) {
		this.password = tpassword;
	}
	public String getsex() {
		return sex;
	}
	public void setsex(String sex) {
		this.sex = sex;
	}
	public String getphoto() {
		return photo;
	}
	public void setphoto(String photo) {
		this.photo = photo;
	}
	@Override
	public String toString() {
		return "Teacher [id=" + id + ", loginName=" + loginName + ", password=" + password + ", sex=" + sex + ", photo=" + photo + "]";
	}
	
	
}
